package com.zttek.photosShareProject.modules.service.login;

import com.baomidou.mybatisplus.plugins.Page;
import com.zttek.photosShareProject.common.json.UserVO;
import com.zttek.photosShareProject.common.myException.DBException;
import com.zttek.photosShareProject.modules.model.User;

import java.util.List;

/**
 * Created by 13296 on 2017/8/11.
 */
public interface IUserService {
    /**
     * 查询所有用户
     * @return
     * @throws Exception
     */
    List<User> selectAllUser()throws Exception;

    /**
     * 模糊分页查询用户
     * @param page
     * @param value
     * @return
     * @throws Exception
     */
    Page<User> selectLike(Page<User> page, String value)throws Exception;

    /**
     * 分页查询用户
     * @param page
     * @return
     * @throws Exception
     */
    Page<User> selectUserPage(Page<User> page)throws Exception;
    User selectUserByAccount(String account)throws DBException;
    User selectUserById(Long id)throws DBException;
    List<User> selectUserByIds(Long[] ids) throws DBException;
    void insertUser(User user)throws DBException;
    void updateUser(User user)throws DBException;
    Page<User> selectStarPage(Page<User> page, Long userId) throws Exception;
    UserVO user2VO(User user, Long userId, boolean withLogo) throws Exception;
    List<UserVO> user2VO(List<User> users, Long userId, boolean withLogo) throws Exception;
}
